export const option = function () {
    const self = this;
    return {
        menuBtn: false,
        border: true,
        index: true,
        indexLabel: "序号",
        stripe: true,
        menuAlign: "center",
        searchMenuSpan: 6,
        align: "center",
        addBtn: false,
        editBtn: false,
        delBtn: false,
        addBtnIcon: " ",
        viewBtn: false,
        card: false,
        columnBtn: false,
        menuWidth: 300,
        dialogClickModal: false,
        dialogWidth: 600,
        span: 24,
        indexWidth: 90,
        searchLabelWidth: 100,
        labelWidth: 120,
        searchIcon: true,
        refreshBtn: false,
        searchMenuPosition: "right",
        searchBtnText: "查 询",
        labelPosition: "right",
        gutter: 24,
        searchGutter: 24,
        searchIndex: 7,
        searchShowBtn: false,
        searchBtn: false,
        emptyBtn: false,
        menu: true,
        dialogCustomClass: "crud-dialog",
        isDialogFullscreen: false,
        submitIcon: ' ',
        // selection: true,
        // selectionWidth: 70,
        // selectionFixed: true,
        column: [
            {
                label: "所在部门",
                search: false,
                prop: "departId",
                props: {
                    label: "name",
                    value: "id",
                    children: "childList",
                },
                hide: false,
                overHidden: true,
                // disabled: true,
                rules: [
                    { required: true, message: "所在部门不能为空", trigger: "change" },
                ],
                filter: false,
                type: "tree",
                dicData: self.treeData,
                nodeClick: (data, form) => {
                    self.rootType = data.rootType;
                }
            },
            {
                label: "职务名称",
                prop: "name",
                hide: false,
                rules: [
                    { required: true, message: "职务名称不能为空", trigger: "blur" },
                    {
                        min: 1,
                        max: 20,
                        message: "长度在 1 到 20 个字符",
                        trigger: "blur",
                    },
                ],
                maxlength: 20,
                search: false,
                overHidden: true,
            },
            {
                label: "排序",
                prop: "sort",
                hide: true,
                type: "number",
                min: 1,
                max: 999,
                search: false,
                overHidden: true,
                value: "",
            },
            // {
            //   label: "所在部门",
            //   search: false,
            //   prop: "departName",
            //   hide: false,
            //   overHidden: true,
            //   editDisplay: false,
            //   addDisplay: false,
            // },
            {
                label: "是否部门领导",
                prop: "leader",
                hide: false,
                search: false,
                span: 24,
                type: "radio",
                rules: [
                    {
                        required: true,
                        message: "是否部门领导不能为空",
                        trigger: "change",
                    },
                ],
                value: "0",
                dicData: [
                    {
                        label: "是",
                        value: "1",
                    },
                    {
                        label: "否",
                        value: "0",
                    },
                ],
            },
            // {
            //   label: "是否岸基",
            //   prop: "isLand",
            //   hide: false,
            //   span: 12,
            //   search: false,
            //   type: "radio",
            //   dicData: [
            //     {
            //       label: '是',
            //       value: '1'
            //     }, {
            //       label: '否',
            //       value: '0'
            //     },
            //   ],
            // },
            {
                label: "职务描述",
                search: false,
                prop: "describe",
                hide: false,
                overHidden: true,
                type: "textarea",
                rules: [{ max: 50, message: "长度在 50 个字符内", trigger: "blur" }],
                maxlength: 50,
            },
        ],
    };
};
